package com.itheima.work1117;

import java.util.Random;

public class RandomNumHandlerDemo {
    public void useRandomNumHandler(RandomNumHandler randomNumHandler){
        System.out.println(randomNumHandler.getNumber());
    }

    public static void main(String[] args) {
        RandomNumHandlerDemo demo = new RandomNumHandlerDemo();
        RandomNumHandler lanber = ()->new Random().nextInt();
        demo.useRandomNumHandler(lanber);
    }
}
